package com.itheima.ood.keywords.demo02;

public class Student {

    // 私有方法，被private修饰了
    private void show(){
        System.out.println("private.....student......show.............");
    }

    // 默认修饰符
    void function(){
        System.out.println("默认.....student......function.............");
    }

    // protected修饰符修饰的方法
    protected void method(){
        System.out.println("protected.....student......method.............");
    }

    // public修饰的方法
    public void sleep(){
        System.out.println("public.....student......sleep.............");
    }

    public static void main(String[] args) {

        // 创建Student的对象
        Student student = new Student();
        student.show();
        student.function();
        student.method();
        student.sleep();

    }

}
